<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>同步，异步</title>
</head>
<body>
    <script>
        console.log('1111');
        console.log('2222');
    </script>
    <script>
        // 同步：代码按照书写顺序执行
        // 异步：代码不按照书写顺序执行
        // 常见的异步操作：setTimeout/setInterval/网络请求(new XMLHttprequest)
        setTimeout(function(){
            console.log('5555')
        },0);
        console.log('3333');
        console.log('4444')
    </script>
</body>
</html>